import myAxios from './myAxios'
//根据经纬度获取位置详情
export const reqAddress=(longitude,latitude)=>myAxios(`/position/${latitude},${longitude}`)

//获取食品分类列表
export const reqFoodCategorys=()=>myAxios('/index_category')
//根据经纬度获取商铺列表
export const reqShops=({longitude,latitude})=>myAxios(`/shops`,{params:{longitude,latitude}})
//用户名密码登录
export const reqPwdLogin=(data)=>myAxios.post('/login_pwd',{...data})
//发送短信验证码
export const reqSendcode=(phone)=>myAxios('/sendcode',{params:{phone}},'GET')
//手机号验证码登录
export const reqSmsLogin=(data)=>myAxios.post('/login_sms',{...data})
//根据session获取用户信息实现自动登录
export const reqUserInfo=()=>myAxios('/auto_login')
//用户登出
export const reqLogout=()=>myAxios('/logout')
//获取商家信息
export const reqShopInfo = () => myAxios('/info')
//获取商家评价数组
export const reqShopRatings = () => myAxios('/ratings')
//获取商家商品数组
export const reqShopGoods = () => myAxios('/goods')
//根据id获取指定商家信息
export const reqOneShop=(id)=>myAxios('/shop/'+id)

